package com.ruoyi.wcf.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wcf.mapper.WcfClassManageMapper;
import com.ruoyi.wcf.domain.WcfClassManage;
import com.ruoyi.wcf.service.IWcfClassManageService;

/**
 * 分类管理Service业务层处理
 *
 * @author LCL
 * @date 2022-04-06
 */
@Service
public class WcfClassManageServiceImpl implements IWcfClassManageService
{
    @Autowired
    private WcfClassManageMapper wcfClassManageMapper;

    /**
     * 查询分类管理
     *
     * @param classId 分类管理主键
     * @return 分类管理
     */
    @Override
    public WcfClassManage selectWcfClassManageByClassId(Long classId)
    {
        return wcfClassManageMapper.selectWcfClassManageByClassId(classId);
    }

    /**
     * 查询分类管理列表
     *
     * @param wcfClassManage 分类管理
     * @return 分类管理
     */
    @Override
    public List<WcfClassManage> selectWcfClassManageList(WcfClassManage wcfClassManage)
    {
        return wcfClassManageMapper.selectWcfClassManageList(wcfClassManage);
    }

    /**
     * 新增分类管理
     *
     * @param wcfClassManage 分类管理
     * @return 结果
     */
    @Override
    public int insertWcfClassManage(WcfClassManage wcfClassManage)
    {
        wcfClassManage.setCreateAt(new Date());
        return wcfClassManageMapper.insertWcfClassManage(wcfClassManage);
    }

    /**
     * 修改分类管理
     *
     * @param wcfClassManage 分类管理
     * @return 结果
     */
    @Override
    public int updateWcfClassManage(WcfClassManage wcfClassManage)
    {
        wcfClassManage.setUpdateAt(new Date());
        return wcfClassManageMapper.updateWcfClassManage(wcfClassManage);
    }

    /**
     * 批量删除分类管理
     *
     * @param classIds 需要删除的分类管理主键
     * @return 结果
     */
    @Override
    public int deleteWcfClassManageByClassIds(Long[] classIds)
    {
        return wcfClassManageMapper.deleteWcfClassManageByClassIds(classIds);
    }

    /**
     * 删除分类管理信息
     *
     * @param classId 分类管理主键
     * @return 结果
     */
    @Override
    public int deleteWcfClassManageByClassId(Long classId)
    {
        return wcfClassManageMapper.deleteWcfClassManageByClassId(classId);
    }
}
